package com.probox.product.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.activity.api.domain.ActivityInfoProVo;
import com.probox.common.core.annotation.Excel;
import com.probox.common.core.utils.StringUtils;
import com.probox.common.core.utils.money.MoneyUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Data
public class ProductInfoVo implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "商品卖点")
    private String productSellingPoints;
    @ApiModelProperty(value = "商品轮播视频")
    private String carouselVedio;
    @ApiModelProperty(value = "商品详情视频")
    private String detailVedio;
    private Long viewNum;
    @ApiModelProperty(value = "直播间id")
    private Long broadcastUid;
    @ApiModelProperty(value = "商品uid")
    private Long productUid;
    @ApiModelProperty(value = "商品名称")
    private String productName;
    @ApiModelProperty(value = "商品详情图")
    private String detailImg;
    @ApiModelProperty(value = "商品编码")
    private String productNo;
    @ApiModelProperty(value = "商品重量")
    private String productWeight;
    @ApiModelProperty(value = "商品单位Uid")
    private Long unitUid;
    @ApiModelProperty(value = "商品单位")
    private String unitName;
    @ApiModelProperty(value = "商品条码")
    private String productBarcode;
    @ApiModelProperty(value = "商品的标签名称,多个是用,隔开")
    private String tagsName;
    @ApiModelProperty(value = "供货价")
    private BigDecimal costPrice;
    @ApiModelProperty(value = "零售价")
    private BigDecimal retailPrice;
    @ApiModelProperty(value = "批发价")
    private BigDecimal tradePrice;
    @ApiModelProperty(value = "划线价")
    private BigDecimal showPrice;
    @ApiModelProperty(value = "预警数量")
    private Long warningNumber;
    @ApiModelProperty(value = "商品总库存")
    private Long stockNumber;
    @ApiModelProperty(value = "供应商")
    private Long supplierUid;
    @ApiModelProperty(value = "平台ID")
    private Long platformUid;
    @ApiModelProperty(value = "分类一级ID")
    private Long categoryUidOne;
    @ApiModelProperty(value = "分类二级ID")
    private Long categoryUidTwo;
    @ApiModelProperty(value = "分类三级ID")
    private Long categoryUidThree;

    @ApiModelProperty(value = "专业一级ID")
    private Long majorUidOne;
    @ApiModelProperty(value = "专业二级ID")
    private Long majorUidTwo;
    @ApiModelProperty(value = "专业三级ID")
    private Long majorUidThree;

    @ApiModelProperty(value = "专业一级ID")
    private String majorUidOneName;
    @ApiModelProperty(value = "专业二级ID")
    private String majorUidTwoName;
    @ApiModelProperty(value = "专业三级ID")
    private String majorUidThreeName;

    @ApiModelProperty(value = "分类")
    private Long categoryUid;

    private String categoryName;

    @ApiModelProperty(value = "论文字数")
    private Integer numbers;

    @ApiModelProperty(value = "论文应用类型")
    private String lunwenType;

    @ApiModelProperty(value = "展示论文文件")
    private String showFile;

    @ApiModelProperty(value = "下载论文文件")
    private String downloadFile;

    @ApiModelProperty(value = "积分")
    private int jifen;

    @ApiModelProperty(value = "下载次数")
    private int downloadCount;

    @ApiModelProperty(value = "页数")
    private int pages;

    @ApiModelProperty(value = "是否过传统查重")
    private String isTraditionDuplicate;

    @ApiModelProperty(value = "是否过AIGC查重")
    private String isAigcDuplicate;

    @ApiModelProperty(value = "品牌ID")
    private Long brandUid;
    @ApiModelProperty(value = "供货价(单位：元)")
    private String costPriceStr;
    @ApiModelProperty(value = "零售价(单位：元)")
    private String retailPriceStr;
    @ApiModelProperty(value = "批发价(单位：元)")
    private String tradePriceStr;
    @ApiModelProperty(value = "划线价(单位：元)")
    private String showPriceStr;
    @ApiModelProperty(value = "商品轮播图(所有)")
    private String carouselImg;
    @ApiModelProperty(value = "商品轮播图(一张)")
    private String carouselImgOne;
    @ApiModelProperty(value = "销量")
    private Long buyNum;
    @ApiModelProperty(value = "商品描述")
    private String productDesc;
    private String detailInfo;
    @ApiModelProperty(value = "商品品牌")
    private ProductBrandVo brand;
    @ApiModelProperty(value = "活动商品")
    private ActivityInfoProVo activityInfoProVo;
    @ApiModelProperty(value = "是否收藏")
    private Boolean collect;
    @ApiModelProperty(value = "商品评论")
    private List<ProductCommentApiVo> ProductCommentList;
    @ApiModelProperty(value = "商品评论总数")
    private Integer commentCount;
    @ApiModelProperty(value = "商品属性集合")
    private List<HashMap> productProerytyVo;
    @ApiModelProperty(value = "发货地址")
    private String sendAdress;
    private String productPlaceProvinceName;
    private String productPlaceCityName;
    private String productPlaceAreaName;
    private String dataStatus;
    private String auditStatus;
    private String sumbitStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    private Long collectNum;
    @ApiModelProperty(value = "分享时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date shareTime;
    @ApiModelProperty(value = "商品分享图片")
    private String shareImg;
    @ApiModelProperty(value = "商品分享文案")
    private String shareTxt;
    @ApiModelProperty(value = "小程序分享二维码")
    private String codeAddress;
    @ApiModelProperty(value = "优惠券显示的名称信息")
    private List<String> couponList;
    @ApiModelProperty(value = "显示优惠券的标签")
    private List<String> couponTags;
    @ApiModelProperty(value = "活动标签")
    private String activityTags;
    @ApiModelProperty(value = "折扣金额")
    private String discount;
    @ApiModelProperty(value = "套餐商品集合")
    private List<HashMap> packagePro;
    @ApiModelProperty(value = "套餐优惠价格")
    private String discountPrice;

    @ApiModelProperty(value = "菠萝派")
    private Long boluoHuaPrice;

    @ApiModelProperty(value = "买断次数")
    private Long buyCount;

    public String getcarouselImgOne() {
        if (!StringUtils.isEmpty(carouselImg)) {
            String[] split = carouselImg.split(",");
            return split[0];
        }
        return "";
    }

    public String getDetailImgOne() {
        if (!StringUtils.isEmpty(detailImg)) {
            String[] split = detailImg.split(",");
            return split[0];
        }
        return "";
    }

    public String getCostPriceStr() {
        return MoneyUtils.changeF2B(costPrice);
    }

    public void setCostPriceStr(String costPriceStr) {
        this.costPriceStr = costPriceStr;
    }


    public String getRetailPriceStr() {
        return MoneyUtils.changeF2B(retailPrice);
    }

    public void setRetailPriceStr(String retailPriceStr) {
        this.retailPriceStr = retailPriceStr;
    }


    public String getTradePriceStr() {
        return MoneyUtils.changeF2B(tradePrice);
    }

    public void setTradePriceStr(String tradePriceStr) {
        this.tradePriceStr = tradePriceStr;
    }


    public String getShowPriceStr() {
        return MoneyUtils.changeF2B(showPrice);
    }

    public void setShowPriceStr(String showPriceStr) {
        this.showPriceStr = showPriceStr;
    }


    /**
     * 允许菠萝金币支付(1允许/0不允许)
     */
    @Excel(name = "允许菠萝金币支付(1允许/0不允许)")
    private String isUseBoluoGoldCoin;

    /**
     * 允许菠萝银币支付(1允许/0不允许)
     */
    @Excel(name = "允许菠萝银币支付(1允许/0不允许)")
    private String isUseBoluoSilverCoin;

    /**
     * 允许使用优惠券(1允许/0不允许)
     */
    @Excel(name = "允许使用优惠券(1允许/0不允许)")
    private String isUseCoupon;


    /**
     * 是否享受会员折扣
     */
    private String isUseMemberDiscount;

    /**
     * 会员等级(哪个等级可以享受折扣)取customerLevel的 customerGrade
     */
    private Long memberLevel;

    private Date createTime;

}
